from framework.constant.resp_code import RespCode


class RespResult(object):

    def __init__(self, resp_code: RespCode, result: object):
        self._resp_code = resp_code
        self._result = result

    def build(self):
        return {
            'code': self._resp_code.value,
            'msg': self._resp_code.desc(),
            'result': self._result
        }
